/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.cspimp.mhm.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseCspImpEntity;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://docs.auauz.net
* @description /
* @author 黄星星
* @date 2020-05-30
**/
@Entity
@Data
@Table(name="mhm_storage_area_manage")
public class StorageAreaManage extends BaseCspImpEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键")
    private Integer id;

    @Column(name = "storage_area_name")
    @ApiModelProperty(value = "储罐区名称")
    private String storageAreaName;

    @Column(name = "storage_thing_name")
    @ApiModelProperty(value = "储存物名称")
    private String storageThingName;

    @Column(name = "storage_numbeer")
    @ApiModelProperty(value = "储存量")
    private String storageNumbeer;

    @Column(name = "protective_dike_area")
    @ApiModelProperty(value = "防护堤面积")
    private String protectiveDikeArea;

    @Column(name = "storage_jar_number")
    @ApiModelProperty(value = "储罐数")
    private String storageJarNumber;

    @Column(name = "storage_jar_space")
    @ApiModelProperty(value = "储罐间距")
    private String storageJarSpace;

    @Column(name = "storage_jar_serial_number")
    @ApiModelProperty(value = "储罐序号")
    private String storageJarSerialNumber;

    @Column(name = "storage_jar_name")
    @ApiModelProperty(value = "储罐名")
    private String storageJarName;

    @Column(name = "storage_jar_model")
    @ApiModelProperty(value = "储罐形式")
    private String storageJarModel;

    @Column(name = "storage_jar_material")
    @ApiModelProperty(value = "储罐材质")
    private String storageJarMaterial;

    @Column(name = "storage_jar_pressure")
    @ApiModelProperty(value = "储罐压力")
    private String storageJarPressure;

    @Column(name = "audit_cycle")
    @ApiModelProperty(value = "审核周期")
    private String auditCycle;

    @Column(name = "fire_class")
    @ApiModelProperty(value = "火灾等级")
    private String fireClass;

    public void copy(StorageAreaManage source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}